@echo off
cd %~dp0

rem ES1/ES3 SELECT start ======================================================
:ES_SELECT
set ES_SELECT_NO=
if not "%GLOBAL_ES_SELECT_NO%"=="" set ES_SELECT_NO=%GLOBAL_ES_SELECT_NO%

:ES_SELECT_01
echo ES1/ES3 select
echo  1: ES1
echo  2: ES3
if not "%ES_SELECT_NO%"=="" echo Selected : %ES_SELECT_NO%
if not "%ES_SELECT_NO%"=="" goto SKIP_ES_SELECT_01
set /p ES_SELECT_NO="Select No. > "
:SKIP_ES_SELECT_01
if "%ES_SELECT_NO%"=="1" goto SELECTED_ES1
if "%ES_SELECT_NO%"=="2" goto SELECTED_ES3
set ES_SELECT_NO=
goto ES_SELECT_01

:SELECTED_ES1
.\Del_Text_From_Input_String.exe ../include/dd_pmc_spi.h DELETE_ES3 1 2
del /f /q ..\doc\MILBCM0_API_History_ES3.txt
del /f /q ..\doc\MILBCM0_API_MainPage_ES3.txt
goto EXIT_SELECTED_ES

:SELECTED_ES3
.\Del_Text_From_Input_String.exe ../include/dd_pmc_spi.h DELETE_ES3 2 2
if not exist ..\doc\MILBCM0_API_History_ES3.txt goto SKIP_SELECTED_ES3_01
move /y ..\doc\MILBCM0_API_History_ES3.txt ..\doc\MILBCM0_API_History.txt
:SKIP_SELECTED_ES3_01
if not exist ..\doc\MILBCM0_API_MainPage_ES3.txt goto SKIP_SELECTED_ES3_02
move /y ..\doc\MILBCM0_API_MainPage_ES3.txt ..\doc\MILBCM0_API_MainPage.txt
:SKIP_SELECTED_ES3_02
goto EXIT_SELECTED_ES

:EXIT_SELECTED_ES
rem ES1/ES3 SELECT end ======================================================

del /f /q .\Del_Text_From_Input_String.exe

